1. Field of the Invention
The present invention relates to a code reading apparatus and code reading method which read a one-dimensional or two-dimensional code in non-touching fashion. More particularly, it relates to a code reading apparatus and code reading method for color images, in which information expressed by the above code is recognized from a color image, and in which the recognized data of the pertinent code and the original color image data of a subject for management as specified by this code can be recorded in mapping with each other.
2. Description of the Related Art
In cases of copying and managing various kinds of printed matter, such as deeds, newspapers, books and documents (hereinbelow, termed xe2x80x9cinformation sourcesxe2x80x9d or xe2x80x9csubjects for managementxe2x80x9d), there has been adopted a method wherein the subjects for management are managed using microfilm, or a method wherein image data accepted by a scanner or the like are recorded on a recording medium and are managed by employing a computer. When the subjects for management as mentioned above are put into the shape of a database so as to be retrievable by way of example and are managed by utilizing a computer, codes for specifying the individual subjects for management are required. Although the codes depend also upon the sorts of the subjects for management and the purposes of the management, a code formed of the character strings of classification No., bond No., document No., a date, etc. is usually afforded in order to specify each of the subjects for management, and the pertinent subject for management is recorded on a recording medium and is managed in association with the identifying code. In this manner, the various information sources are managed by utilizing the computer, whereby the retrievals of the information sources are facilitated. Moreover, it is dispensed with to take copies of the information sources on paper or the like and to keep the copies in custody, and a space for custody can be made smaller.
Meanwhile, in recent years, one-dimensional or two-dimensional codes in each of which the No., trade name, price and other information items of a product or a component are symbolized by a bar pattern in, for example, monochrome have been extensively employed in order to recognize the Nos., trade names, prices and other information items of products or components. Such one-dimensional codes or two-dimensional codes expressed by the code patterns having different reflection factors represent a series of numerals and characters in terms of the combinations of the ratios between the widths of lines in, for example, white and black, and the Nos., trade names, prices and other information items of the products or components are replaced with the numerals and characters.
Therefore, in a case where the one-dimensional codes or two-dimensional codes are utilized as the above identifying codes for specifying the subjects for management and where management information items are further included in the codes, the labor of inputting codes anew can be saved, and it is permitted to easily manage the images of the various subjects for management. A code reading apparatus for such one-dimensional codes or two-dimensional codes recognizes each code from a white-and-black image (achromatic image), and it includes an imaging device for the white-and-black images as has a high resolution. In general, it is incarnated as an apparatus dedicated to the code reading.
Meanwhile, an example of an optical information reading apparatus furnished with the function of reading images other than codes is disclosed in the official gazette of Japanese Patent Laid-Open No. 307886/1998. The apparatus disclosed in this official gazette (hereinbelow, termed the xe2x80x9cprior-art examplexe2x80x9d) is such that an image to be read and a two-dimensional code can be simultaneously accepted by a single portable terminal. More specifically, the read port of a handy scanner is directed toward the sealing area 72 of a delivery slip 70 as shown in FIG. 1 by way of example, so as to read the two-dimensional image thereof, and two-dimensional image data (multi-valued image data obtained by quantizing continuous density values) are stored in a multi-valued image memory as they are, while binary image data obtained by binary-coding the multi-valued image data are stored in a two-valued image memory, whereupon the contents of both the memories are transmitted to a host computer or the like. Besides, a two-dimensional code 74 existing in the sealing area 72 is decrypted on the basis of the above binary image data, and the decrypted code data and the two-dimensional image data of the sealing area 72 can be recorded in association.
The apparatus disclosed in the prior-art example stated above decrypts the code on the basis of the binary image data composed of the two levels of xe2x80x9c1xe2x80x9d (high) and xe2x80x9c0xe2x80x9d (low), and it is effective in the case of managing the achromatic information sources of the sealing information, etc. However, it is not applicable in a case where the information sources are colored, and it has such a disadvantage that the range of utilization is limited. In order to cope with color images, it is considered by way of example that a system in which the signal of any of color components R, G and B is binary-coded into data for decrypting the code is applied to the apparatus disclosed in the prior-art example. However, even when an imaging device of high resolution is employed, the sensitivity thereof lowers to 1/3, to pose the problem that code recognition of high precision cannot be realized. Also considered is a method in which a code reading apparatus such as bar code reader, and an image processing apparatus are unitarily constructed, but the method poses the problems that the whole apparatus becomes large in size and that it becomes expensive.
The present invention has been made in view of the above circumstances, and it has for its object to provide a code reading apparatus capable of coping with color images, which can simultaneously accept a one-dimensional code or two-dimensional code and the data of the color image of a subject for management, and which can record both the data in mapping with each other. Another object is to provide a code reading apparatus and method for color images, which has a high precision for recognizing a code, which is inexpensive and which is small in size.
The present invention concerns a code reading apparatus and method which read a one-dimensional or two-dimensional code in non-touching fashion. Regarding the apparatus, the objects of the present invention are accomplished by comprising color image pickup means for picking up the code and also a color image of a subject for management as is specified by identification information contained in said code; code-recognizing-data extraction means for extracting luminance data from the color image data picked up by said color image pickup means, and for writing gray scale data into a first frame memory as data for recognizing said code; and recorded-image extraction means for extracting color data from said color image data picked up by said color image pickup means, and for writing the color data into a second frame memory as data for the original image of the subject for management.
Further, the objects are accomplished more effectively by each of a contrivance in which said code-recognizing-data extraction means extracts the luminance data in such a way that pixel data of respective color components R, G and B constituting said color image data are added at predetermined ratios; a contrivance in which a signal processing circuit of said code-recognizing-data extraction means and a signal processing circuit of said recorded-image extraction means are connected to an output side of said color image pickup means through an A/D converter and in parallel with each other, and said color image data is concurrently processed by the signal processing circuits so as to separate and extract the luminance data and said color data; and a contrivance in which decode means for recognizing and decoding the information expressed by said code, from the gray scale data is comprised.
Besides, regarding the method, the objects of the present invention are accomplished in such a way that a color imaging device is employed as an imaging element of a code reading apparatus; that a one-dimensional or two-dimensional code which contains identification information for specifying a subject for management, and color image data which contains the subject for management, are inputted from the imaging device; that pixel data constituting the color image data is concurrently processed by respective signal processing circuits for luminance extraction and for color extraction, thereby to separate and extract luminance data and color data; that the information expressed by the code is recognized on the basis of gray scale data formed of the luminance data of each pixel; and that said code and the original color image data of said subject for management can be recorded in mapping with each other.